package EX2;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class demo2_3 {
    public static void main(String[] args) throws IOException {
        File f=new File("C:/filea/a.txt");
        Reader reader=new FileReader(f);
        int n;
        char[] c=new char[50];
        while ((n=reader.read(c))!=-1){
            for (int i = 0; i < n; i++) {
                System.out.print(c[i]);
            }
        }
    }
}
